<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:60:"/home/zbz/WWW/ffcms/application/admin/view/picture/show.html";i:1459784586;s:71:"/home/zbz/WWW/ffcms/public/../application/admin/view/public/layout.html";i:1459782055;}*/ ?>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="__ADMIN__/lib/html5.js"></script>
<script type="text/javascript" src="__ADMIN__/lib/respond.min.js"></script>
<script type="text/javascript" src="__ADMIN__/lib/PIE_IE678.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="__ADMIN__/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css" href="__ADMIN__/css/H-ui.admin.css" />
<link rel="stylesheet" type="text/css" href="__ADMIN__/lib/Hui-iconfont/1.0.1/iconfont.css" />
<!--[if IE 6]>
<script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js"></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->


<title>图片查看</title>
</head>
<body>

<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 图片管理 <span class="c-gray en">&gt;</span> 图片展示 <a class="btn btn-success radius r mr-20" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="pd-20">
    <div class="cl pd-5 bg-1 bk-gray mt-20"> <span class="l"><a href="javascript:;" onclick="del_picture()" class="btn btn-danger radius"><i class="Hui-iconfont">&#xe6e2;</i> 批量删除</a> </span> <span class="r">共有数据：<strong><?php echo $count; ?></strong> 条</span> </div>
    <div class="portfolio-content">
        <ul class="cl portfolio-area">
            <?php foreach($list as $v): ?>
            <li class="item" id="item_<?php echo $v['id']; ?>">
                <div class="portfoliobox">
                    <input class="checkbox" name="chkContentId" type="checkbox" value="<?php echo $v['id']; ?>">
                    <div class="picbox"><img src="<?php echo $v['path']; ?>-w150" layer-src="<?php echo $v['path']; ?>" alt="<?php echo $v['pname']; ?>"></div>
                    <div class="textbox"><?php echo $v['pname']; ?> </div>
                </div>
            </li>
            <?php endforeach; ?>

        </ul>
        <div id="page" style="margin-top: 20px"></div>
    </div>
</div>


<script type="text/javascript" src="__ADMIN__/lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="__ADMIN__/lib/layer/1.9.3/layer.js"></script>


<script type="text/javascript" src="__ADMIN__/lib/laypage/1.2/laypage.js"></script>
<script type="text/javascript">
layer.config({
  extend: 'extend/layer.ext.js'
});
$(function(){
    laypage({
        cont: $('#page'), //容器。值支持id名、原生dom对象，jquery对象,
        pages: <?php echo $max_page; ?>, //总页数
        skip: true, //是否开启跳页
        groups: 3, //连续显示分页数
        curr: function(){ //通过url获取当前页，也可以同上（pages）方式获取
            var page = location.search.match(/page=(\d+)/);
            return page ? page[1] : 1;
        }(),
        jump: function(obj, first){ //触发分页后的回调
            if(!first){ //点击跳页触发函数自身，并传递当前页：obj.curr
                location.href = '<?php echo $url; ?>page='+obj.curr;
            }
        }
    });

    $(".item").hover(function(){
        $(this).attr('class','item hover');
    },function(){
        $(this).attr('class','item');
    })
});

$(window).load(function() {
    layer.photos({
         photos: '.picbox'
    });
});

function del_picture(){
    layer.confirm('是否确定删除选中图片？',{icon:0},function(index){
        layer.close(index);
        $('input[name="chkContentId"]:checked').each(function() {
            var did = $(this).val();
            $.post('<?php echo U("picture/delPicture"); ?>',{pid:did},function($data){
                if($data.status == 'n'){
                    layer.msg($data.info,{icon:2,time:1000});
                    return false;
                }else{
                    $("#item_"+did).remove();
                }
            },'json')
        });
    });
}
</script>

<script type="text/javascript" src="__ADMIN__/js/H-ui.js"></script>
<script type="text/javascript" src="__ADMIN__/js/H-ui.admin.js"></script>
</body>
</html>
